Skip to main content

Save Image

AutomatR.Web.SaveImage

The "Save Image" activity in AutomatR facilitates saving an image to a specified location on your local drive. This activity is useful for capturing and persisting images obtained during UI automation workflows.

Properties

NameDescription
Input
File PathSpecifies the complete file path, including the location and file name, where the image should be saved on the local drive. Ensure to provide a valid string containing the desired folder location and file name (e.g., "D:\test\image.png").
ImageSpecifies the image variable containing the image data to be saved. Ensure to provide a valid image variable obtained from other activities.
Misc
Display NameProvides a customizable name for the activity displayed in the workflow. String variables containing the desired display name.
Optional
DelaySpecifies the amount of time (in seconds) to wait before executing the "Save Image" activity. This can be useful for handling synchronization issues or waiting for specific conditions before saving the image. Integer variables containing the delay duration. Ex.: If the amount of time is 1000 milliseconds or 1 sec, i.e. 1.

The "Save Image" activity does not provide direct output. Check the specified file path for the saved image on your local drive or use additional activities as needed.

How to use:

  1. Drag and drop the "Save Image" activity onto the workflow.
  2. Configure the properties by specifying the file path and providing the image variable obtained from other activities.
  3. Optionally, configure the delay to wait for a specific duration before saving the image.
  4. Execute the workflow to save the specified image to the local drive.

Example: Consider an example where the "Save Image" activity is used to save a captured screenshot to a specific folder:

Save Image:
File Path: "D:\\Screenshots\\captured_image.png"
Image: capturedScreenshot
Delay: 2 (seconds)

In this example, the activity saves the image variable "capturedScreenshot" to the specified file path, "D:\Screenshots\captured_image.png". The delay of 2 seconds allows time for any required conditions to be met before saving the image.